import {getToken} from '@/utils/token'
import { Navigate } from 'react-router-dom'
// 使用Token做路由权限控制
function AuthRouter ({children}){
    const token = getToken ()
    return token ? children : <Navigate to="/login" replace />
}

export  {AuthRouter}